package com.cn.xiaonuo.tcrfinance.tcragents.utils;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

/**
 * @author ＹｕＨａｏ·ｐｅｎｇ
 * @date 2021年12月15日 14:43
 */
public class AuthenticationIdentity {
    private  static  final  String CALC_FUNTION="MD5";
    private  static  final  int HASH_ITER=1024;
    private  static  final  String CONNATE="superMan";

    //本地产生
    public static String doMachiningPassKey(String keyTime){
        ByteSource idensalt = ByteSource.Util.bytes(CONNATE);
        String realKey = new SimpleHash(CALC_FUNTION, keyTime, idensalt, HASH_ITER).toString();
        return  realKey;
    }


}


